<template>
    <div class="footer flex jc-sb">
        <div class="footer-left ">
            <dl class="table">
                <dd v-for="item in paymentRecieved">
                    Payment Received:
                    <span class="f14">{{ utils.currencType(item.Current) }}{{ item.Paied }}{{
                        `&nbsp${item.ReceiveTime}`
                    }}from{{ `&nbsp${item.payment}` }}</span>
                </dd>
                <dd v-for="item in costs" class="f14">
                    Cost: <span class="f12">{{ utils.currencType('RMB') }}{{ item.price }}</span>
                </dd>
                <dd v-for="item in footershippingCost" class="f14">
                    Shipping Cost:<span class="f12">{{ utils.currencType('RMB') }}{{
                        item.Shipping_cost
                    }}</span>
                </dd>
            </dl>
        </div>
        <div class="footer-right">
            <dl class="height flex aic ">
                <dd class="color ddtitle cp f14" @click="() => { emits('open1', 1) }">Discount</dd>
                <p class="shuxian"></p>
                <dd class="color ddtitle cp f14" @click="() => { emits('open1', 2) }">ShippingCost</dd>
                <p class="shuxian"></p>
                <dd class="color ddtitle cp f14" @click="() => { emits('open1', 3) }">PaymentFee</dd>
                <p class="shuxian"></p>
                <dd class="color ddtitle cp f14" @click="() => { emits('open1', 4) }">Vat</dd>
            </dl>
            <dl class="table">
                <dd class="f14">
                    Subtal: <span class="f12"  v-if='subTotal' >{{ utils.currencType(sInfo.currencyType) }}{{
                        subTotal }}</span>
                </dd>
                <dd class="f14" v-if="discountInfo !== 0">
                    Discount: <span class="f12">{{ utils.currencType(sInfo.currencyType) }}{{ discountInfo }}</span>
                </dd>
                <dd class="f14" v-if="shippingCostInfo !== 0">
                    ShippingCost: <span class="f12">{{ utils.currencType(sInfo.currencyType) }}{{
                        shippingCostInfo
                    }}</span>
                </dd>
                <dd class="f14" v-if="paymentFeeInfo !== 0">
                    PaymentFee: <span class="f12">{{ utils.currencType(sInfo.currencyType) }}{{
                        paymentFeeInfo
                    }}</span>
                </dd>
                <dd class="f14" v-if="vatInfo !== 0">
                    Vat: <span class="f12">{{ utils.currencType(sInfo.currencyType) }}{{ vatInfo }}</span>
                </dd>
                <dd class="f14" v-if="totalInfo !== 0">
                    Total: <span class="f12">{{ utils.currencType(sInfo.currencyType) }}{{ totalInfo }}</span>
                </dd>
            </dl>
        </div>
    </div>
</template>

<script setup>
import * as utils from "../utils.js"
const props = defineProps({
    paymentRecieved: Object,
    subTotal: Number,
    discountInfo: String,
    shippingCostInfo: String,
    paymentFeeInfo: String,
    vatInfo: String,
    totalInfo: String,
    sInfo: Object
})
const emits = defineEmits(['open1'])
</script>
<style></style>

